using System.Data;
using System.Collections;
using Microsoft.VisualBasic;
using System.Diagnostics;
using System;
using Microsoft.ReportingServices.ReportRendering;

namespace CustomExcelRenderCS
{
	internal class SubreportRenderer
	{
		
		private int g_levelRow = 0;
		private int g_levelCol = 0;
        public static int curCellRow = 0;
        public static int curCellCol = 0;
        public int totCol = 0;
        public static int totRows = 0;
        public static double startPos = 0;
        public static double headerPos = 0;
        public static Hashtable columnNames = new Hashtable();          // table column name collection 
        public static Hashtable hDataElements = new Hashtable();          // report DataElement names 
        private double reportGridLength = 0.125;

        /// <summary>
        /// construct
        /// </summary>
		internal SubreportRenderer()
		{
			
		}
		
		protected internal string Render(Microsoft.ReportingServices.ReportRendering.SubReport subreport)
		{
            System.Text.StringBuilder pHtml = new System.Text.StringBuilder();

            ReportItemCollection rItems = subreport.Report.Body.ReportItemCollection;

            for (int i = 0; i < rItems.Count; i++ )
            {
                pHtml.Append( Renderer.RenderReportItem(rItems[i]));
            }

            return pHtml.ToString();
        }

   
	}
	
	
	
}
